package com.thinqq.web.client;

import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.VerticalPanel;

public abstract class MenuCommand implements com.google.gwt.user.client.Command {
	private HorizontalPanel mainContent;
	private VerticalPanel relatedContent;

	@Override
	public void execute() {
		updateMainAreaContent(mainContent);
		updateRelatedAreaContent(relatedContent);
	}
	abstract protected void updateMainAreaContent(HorizontalPanel mainContent);
	abstract protected void updateRelatedAreaContent(VerticalPanel relatedContent);

	public void setContentPanelsTobeUpdated(HorizontalPanel mainContent,
			VerticalPanel relatedContent) {
		this.mainContent = mainContent;
		this.relatedContent = relatedContent;
	}
}
